package cn.duxiaod.demo.enumtest;

import org.junit.Test;

/**
 * 枚举测试
 */
public class EnumTest {

    @Test
    public void pizzaStatusTest(){
        System.out.println(PizzaStatus.ORDERD);//ORDERD
        System.out.println(PizzaStatus.ORDERD.equals("ORDERD"));//false
        System.out.println(PizzaStatus.ORDERD.name().equals("ORDERD"));//true
    }

    @Test
    public void enumSingletonTest(){
        int age = EnumSingletonTest.getInstance().getAge();
        System.out.println(age);
    }
}
